﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Xml.Linq;

public partial class Admin_MasterPage : System.Web.UI.MasterPage
{
    protected void Page_Load(object sender, EventArgs e)
    {
        Response.Cache.SetExpires(DateTime.Now.AddDays(-1));
        Response.Cache.SetCacheability(HttpCacheability.NoCache);
        Response.Cache.SetValidUntilExpires(true);

        if (Convert.ToInt32(Session["UserID"]) == 0)
        {
            Response.Redirect("Login.aspx");
        }
    }

    protected void btnAddArticle_Click(object sender, EventArgs e)
    {
        Response.Redirect("addArticle.aspx");
    }

    protected void btnBackToPortal_Click(object sender, EventArgs e)
    {
        Response.Redirect("../default.aspx");
    }

    protected void btnLogout_Click(object sender, EventArgs e)
    {
        Session["UserID"] = 0;
        Response.Redirect("Login.aspx");
    }
}
